%% @author Administrator
%% @doc @todo Add description to account_ets.


-module(account_ets).


-include("global.hrl").
-include("account.hrl").

%% ====================================================================
%% API functions
%% ====================================================================
-export([data_get/1,
		 data_set/2]).



%% ====================================================================
%% Internal functions
%% ====================================================================


data_get(Player) ->
	case maps:get(?MODULE, Player, ?init) of
		?init ->
			#u_account{};
		UAccount ->
			UAccount
	end.


data_set(Player, #u_account{} = UAccount) ->
	maps:put(?MODULE, UAccount, Player).

